import { comfyElectronApi } from "../lib/bridge"

export const ComfyUIQueueButton = () => {
    return (
      <div className="action action-comfyui-queue" onClick={ev => {
        comfyElectronApi.windowTabManager.triggerAction({
          type: "open-comfyui-queue-manager"
        })
      }}>
        <div className="icon">
          <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M4.74531 18.7549H19.2548C20.2643 18.7549 20.9272 18.107 20.9272 17.1126V6.32464C20.9272 5.33022 20.2643 4.6748 19.2548 4.6748H4.74531C3.72829 4.6748 3.07288 5.33022 3.07288 6.32464V17.1126C3.07288 18.107 3.72829 18.7549 4.74531 18.7549ZM4.73024 7.5752C4.5193 7.5752 4.37617 7.42453 4.37617 7.22866V6.45271C4.37617 6.2267 4.52684 6.0685 4.75284 6.0685H5.63426C5.83766 6.0685 5.9808 6.21917 5.9808 6.43011V7.22866C5.9808 7.42453 5.83766 7.5752 5.63426 7.5752H4.73024ZM7.5327 11.018C7.29163 11.018 7.14096 10.8673 7.14096 10.6338V6.45271C7.14096 6.21164 7.29163 6.0685 7.5327 6.0685H16.4523C16.6859 6.0685 16.8365 6.21164 16.8365 6.45271V10.6338C16.8365 10.8673 16.6859 11.018 16.4523 11.018H7.5327ZM18.3508 7.5752C18.1398 7.5752 17.9967 7.42453 17.9967 7.22866V6.43011C17.9967 6.21917 18.1398 6.0685 18.3508 6.0685H19.2247C19.4507 6.0685 19.6089 6.2267 19.6089 6.45271V7.22866C19.6089 7.42453 19.4582 7.5752 19.2473 7.5752H18.3508ZM4.73024 10.0386C4.5193 10.0386 4.37617 9.88044 4.37617 9.6921V8.90862C4.37617 8.69768 4.5193 8.54701 4.73024 8.54701H5.63426C5.83766 8.54701 5.9808 8.69768 5.9808 8.90862V9.6921C5.9808 9.88044 5.83766 10.0386 5.63426 10.0386H4.73024ZM18.3508 10.0386C18.1398 10.0386 17.9967 9.88044 17.9967 9.6921V8.90862C17.9967 8.69768 18.1398 8.54701 18.3508 8.54701H19.2473C19.4657 8.54701 19.6089 8.69768 19.6089 8.90862V9.6921C19.6089 9.88044 19.4582 10.0386 19.2473 10.0386H18.3508ZM4.73024 12.4569C4.5193 12.4569 4.37617 12.3062 4.37617 12.1104V11.3344C4.37617 11.1159 4.5193 10.9728 4.73024 10.9728H5.63426C5.83766 10.9728 5.9808 11.1159 5.9808 11.3344V12.1104C5.9808 12.3062 5.83766 12.4569 5.63426 12.4569H4.73024ZM18.3508 12.4569C18.1398 12.4569 17.9967 12.3062 17.9967 12.1104V11.3344C17.9967 11.1159 18.1398 10.9728 18.3508 10.9728H19.2473C19.4657 10.9728 19.6089 11.1159 19.6089 11.3344V12.1104C19.6089 12.3062 19.4582 12.4569 19.2473 12.4569H18.3508ZM7.5327 17.3537C7.29163 17.3537 7.14096 17.203 7.14096 16.9694V12.811C7.14096 12.5774 7.29163 12.4268 7.5327 12.4268H16.4523C16.6859 12.4268 16.8365 12.5774 16.8365 12.811V16.9694C16.8365 17.203 16.6859 17.3537 16.4523 17.3537H7.5327ZM4.73024 14.8977C4.5193 14.8977 4.37617 14.732 4.37617 14.5437V13.7602C4.37617 13.5492 4.5193 13.3986 4.73024 13.3986H5.63426C5.83766 13.3986 5.9808 13.5492 5.9808 13.7602V14.5437C5.9808 14.732 5.83766 14.8977 5.63426 14.8977H4.73024ZM18.3508 14.8977C18.1398 14.8977 17.9967 14.732 17.9967 14.5437V13.7602C17.9967 13.5492 18.1398 13.3986 18.3508 13.3986H19.2473C19.4657 13.3986 19.6089 13.5492 19.6089 13.7602V14.5437C19.6089 14.732 19.4582 14.8977 19.2473 14.8977H18.3508ZM4.75284 17.3537C4.52684 17.3537 4.37617 17.203 4.37617 16.977V16.2086C4.37617 15.9976 4.5193 15.8545 4.73024 15.8545H5.63426C5.83766 15.8545 5.9808 15.9976 5.9808 16.2086V16.9996C5.9808 17.2105 5.83766 17.3537 5.63426 17.3537H4.75284ZM18.3508 17.3537C18.1398 17.3537 17.9967 17.2105 17.9967 16.9996V16.2086C17.9967 15.9976 18.1398 15.8545 18.3508 15.8545H19.2473C19.4582 15.8545 19.6089 15.9976 19.6089 16.2086V16.977C19.6089 17.203 19.4507 17.3537 19.2247 17.3537H18.3508Z" fill="white" />
          </svg>
        </div>
        Queue
      </div>
    )
}